feat: add injectable interceptor targets for trading-screen plugins#20
Open
cryptobardx wants to merge 4 commits into
Open
feat: add injectable interceptor targets for trading-screen plugins#20cryptobardx wants to merge 4 commits into
cryptobardx wants to merge 4 commits into
Conversation
added 4 commits
May 29, 2026 12:06
…eptor-targets # Conflicts: # packages/ui-order-entry/src/orderEntry.ui.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We've been building a grid-bot plugin on top of the SDK and ran into a few spots on the trading screen that aren't interceptable yet. This adds them as injectable targets so a plugin can extend order entry, the chart, and the data list without forking.
It's all additive. Each target wraps existing UI and falls back to the original (or renders nothing) when nothing intercepts it, so default behavior doesn't change.
What's added:
Trading.OrderEntry.AdvancedSelect: add an item to the order-type Advanced dropdown (same items-prop shape asTradingView.DisplayControl.DesktopMenuList). A selected value that isn't a realOrderTypegets routed throughonExtraSelectand tracked asselectedExtraId.Trading.OrderEntry.Body: replace the form body (e.g. a custom deploy form) while the type selector stays in place.Trading.OrderEntry.BuySellSwitch: now takesselectedCustomTypeIdso a plugin can hide Buy/Sell for its own type only.Trading.Chart.Overlay: renders over the chart once the widget is ready, and gets the liveIChartingLibraryWidgetand current symbol (exposed via areadyWidgetstate set inonChartReady).Trading.DataList.Desktop.Tabs: append tabs to the desktop data list.Worth calling out: four of these are plain wrappers, but the order-type one is a bit more involved.
orderTypeSelectandorderEntry.uinow trackselectedExtraIdso a non-OrderTypeselection can drive the body and the side switch. I leftInjectableOrderEntryand the widget alone, but if you'd rather have a proper custom-order-type registration API instead of this routing, I'm happy to redo it that way.Desktop only for now. The mobile layout doesn't have equivalents yet, so mobile will come as a separate PR.
How I tested it: built the workspace and drove all five from a small throwaway plugin on the storybook trading page. The custom type shows in the dropdown; selecting it swaps the body and hides Buy/Sell; the chart overlay draws with the live widget and follows symbol changes; and a custom tab shows in the data list. Nothing changes when no plugin is registered.